<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>IT服务信息平台  我的信息管理</title>
	<s:head theme="ajax"/>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript">
     function selectTab(id) {
     var tabContainer = dojo.widget.byId("tabContainer");
     tabContainer.selectTab(id);
  	 }
  	 function sendMess()
  	 {
  	 	var inuser=document.getElementById("inuser").value;
  	 	var content=document.getElementById("content").value;
  	 	if(inuser!=""&&content!="")
  	 	{
  	 		document.sendmess.submit();
  	 	}
  	 }
	</script>
  </head>
  
  <body onload="selectTab('right')">
  <jsp:include page="header.jsp"></jsp:include>
    <div  style="width: 800px;margin: 0 auto;border-style: solid;border-width: 1px;margin-bottom: 2px;">
    <div class="navigation" align="left"><table><tr class="navigation" ><td>你所在位置:<a href="gongxu/index.jsp">首页</a>>我的空间>我的信息管理</td></tr></table></div>
    	<div style="width: 100px;float: left;border-style: solid;border-width: 1px;">
    		<table width="100%">
    			<tr height="40px;" align="center" ><td ><a href="gongxu/usr_getUserInfoById.shtml">基本信息</a></td></tr>
    			<tr height="40px;" align="center"><td ><a href="gongxu/gx_callList.shtml">我的呼叫</a></td></tr>
    			<tr height="40px;" align="center"><td><a href="gongxu/Comm_collList.shtml">呼叫收藏</a></td></tr>
    			<tr height="40px;" align="center"><td style="background-color:#66FF33;"><a href="gongxu/Comm_getMessAll.shtml">我的信息</a></td></tr>
    		</table>
    	</div>
    	<div style="width:698px; float: right;border-style: solid;border-width: 1px;">

		<s:tabbedPanel name="tabContainer" id="tabContainer" doLayout="true" theme="ajax"
		               cssStyle="width:100%;height:400px">
		        <s:div label="收信箱" id="left" theme="ajax">
		                   <table width="100%" align="center">
    			<tr>
    				<th>内容</th>
    				<th>时间</th>
    				<th>发送人</th>
    				<th>操作</th>
    			</tr>
    			<s:iterator value="#request.messList" id="mess" status="mess_state">
    				<tr>
    					<td><s:property value="mess.content"/></td>
    					<td><s:date name="mess.sendTime" format="yyyy:MM:dd HH:mm:ss"/></td>
    					<td><s:property value="mess.sendUser.userName"/></td>
						<td>
							<img src="css/img/delete.gif" title="删除" border="0" onclick="if (confirm('是否要删除该信息!'))location.href='Comm_delMess.shtml?mess.messId=<s:property value="messId"/>';return false;" />
							<input type="button" value="回复" onclick="javascript:location.href='Comm_getMessAll.shtml?mess.inUser=<s:property value="mess.sendUser.userName"/>'">
						</td>
    				</tr>
    			</s:iterator>
    		</table>
		        </s:div>
		        <s:div label="写信息" id="right" theme="ajax">
		           <s:form id="sendmess" name="sendmess" action="Comm_addMess" method="post">
		           		<table>
		           			<tr><td>收信人:</td><td><s:textfield id="inUser" name="mess.inUser" /><SPAN style="color: red;">*</SPAN> </td></tr>
		           			<tr><td>内容:</td>
		           			<td><s:textarea rows="4" cols="45" id="content" name="mess.content"></s:textarea> <SPAN style="color: red;">*</SPAN></td></tr>
		           			<tr><td colspan="2"><input type="button" value="发送" onclick="sendMess()"/></td></tr>
		           		</table>
		           </s:form>
		        </s:div>
		</s:tabbedPanel>
    		
    	</div>
    </div>
   <jsp:include page="bottom.jsp"></jsp:include>
  </body>
</html>
